<?php 
defined('IN_TS') or die('Access Denied.');

$page = isset($_GET['page']) ? intval($_GET['page']) : 1;

$lstart = $page*12-12;

$url = tsUrl('plan','index',array('page'=>''));

//全部方案
$arrPlan = $new['plan']->findAll('plan',array('isaudit'=>0),'isrecommend desc,addtime desc',null,$lstart.',12');

foreach($arrPlan as $k=>$item){
    $arrPlan[$k]['group'] = aac('group')->getOneGroup($item['groupid']);
}

$planNum = $new['plan']->findCount('plan',array('isaudit'=>0));

$pageUrl = pagination($planNum, 12, $page, $url);

$title = '方案';
include template("index");